package com.sise.wangzhan.filter;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Classname FilterConfig
 * @Description TODO
 * @Date 2020/5/21 11:42
 * @Created by wangzhan
 */
@Configuration
public class FilterConfig {

    @Bean
    public RestTemplateFilter restTemplateFilter(RestTemplate restTemplate) {
        return new RestTemplateFilter(restTemplate);
    }

    @LoadBalanced
    @Bean
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
